package com.shengqin.utils;

import org.springframework.util.StringUtils;

public class ProjectUtil {

    public static String getPrjName(String prjCode){
        String prjName = "";
        if(StringUtils.hasLength(prjCode)){

            switch (prjCode){
                case "1":
                    prjName = "肺活量";
                    break;
                case "2":
                    prjName = "身高";
                    break;
                case "3":
                    prjName = "体重";
                    break;
                case "4":
                    prjName = "BMI";
                    break;
                case "5":
                    prjName = "坐位体前屈";
                    break;
                case "6":
                    prjName = "立定跳远";
                    break;
                case "7":
                    prjName = "50米跑";
                    break;
                case "8":
                    prjName = "一分钟跳绳";
                    break;
                case "9":
                    prjName = "一分钟仰卧起坐";
                    break;
                case "10":
                    prjName = "引体向上";
                    break;
                case "11":
                    prjName = "800米";
                    break;
                case "12":
                    prjName = "1000米";
                    break;
                case "15":
                    prjName = "50米×8往返跑";
                    break;
                case "13":
                    prjName = "左眼视力";
                    break;
                case "14":
                    prjName = "右眼视力";
                    break;
                default:
                    prjName = "";
            }
        }
        return prjName;
    }


    public static String getPrjCode(String prjName){
        String prjCode = "";
        switch (prjName){
            case "肺活量":
                prjCode = "1";
                break;
            case "身高":
                prjCode = "2";
                break;
            case "体重":
                prjCode = "3";
                break;
            case "BMI":
                prjCode = "4";
                break;
            case "坐位体前屈":
                prjCode = "5";
                break;
            case "立定跳远":
                prjCode = "6";
                break;
            case "50米跑":
                prjCode = "7";
                break;
            case "一分钟跳绳":
                prjCode = "8";
                break;
            case "一分钟仰卧起坐":
                prjCode = "9";
                break;
            case "引体向上":
                prjCode = "10";
                break;
            case "800米":
                prjCode = "11";
                break;
            case "1000米":
                prjCode = "12";
                break;
            case "50米×8往返跑":
                prjCode = "15";
                break;
            default:
                prjCode = "";
        }
        return prjCode;
    }
}
